from . import Anti_Spoof_net
from models.base_model import init_net
def define_network(opt,gpu_ids):#input_dim=3, output_dim=3, ndf=32
    if len(gpu_ids):
        net = Anti_Spoof_net.Anti_spoof_net(opt.input_nc,opt.output_nc,opt.ngf,gpu_ids[0])
    else:
        net = Anti_Spoof_net.Anti_spoof_net(opt.input_nc,opt.output_nc,opt.ngf)

    # net_decoder = torch.nn.DataParallel(net_decoder).cuda()
    # net_encoder_polar = torch.nn.DataParallel(net_encoder_polar).cuda()
    # net_encoder_vis = torch.nn.DataParallel(net_encoder_vis).cuda()

    return init_net(net, opt.init_type, opt.init_gain, gpu_ids)